package com.zzyl.common.utils;

import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;

import java.io.IOException;
import java.io.InputStream;

public class PDFUtil {
    public static String getPDFText(InputStream inputStream) throws IOException {

        try(PDDocument document = PDDocument.load(inputStream)){
            return new PDFTextStripper().getText(document);
        }

    }
}
